package com.aaa.hospital.ManagementEnd.service.Impl;

import com.aaa.hospital.ManagementEnd.mapper.AppointmentDao;
import com.aaa.hospital.ManagementEnd.mapper.RegistrationDao;
import com.aaa.hospital.ManagementEnd.pojo.Appointment;
import com.aaa.hospital.ManagementEnd.pojo.Registration2;
import com.aaa.hospital.ManagementEnd.service.RegistrationServices;
import com.aaa.hospital.ManagementEnd.util.RegistrationDB;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class RegistrationServicesImpl implements RegistrationServices {
    @Autowired
    private RegistrationDao mapper;
     @Autowired
     private AppointmentDao appointmentmapper;


    @Override
    public List<RegistrationDB> queryAll(Integer did) {
        return mapper.queryAll(did);
    }


    @Override
    public RegistrationDB selectById(Integer id) {
        return mapper.selectById(id);
    }

    @Override
    public List<RegistrationDB> limitAll(Integer did, Integer uid, String uname) {
        return mapper.limitAll(did, uid, uname);
    }

    @Override
    public Integer regById(Integer id) {
        Registration2 registration =mapper.regById(id);
        Integer inspect = registration.getInspect();
       return inspect;
    }

    @Override
    public boolean upstate(Integer id) {
        return mapper.upstate(id);
    }

    @Override
    public boolean update_state(Integer id, Integer state) {
        return mapper.update_state(id, state);
    }

    @Override
    public List<Registration2> queryBySize(int visid, Date visitdate) {
        return mapper.queryBySize(visid, visitdate);
    }


}
